package com.fzj.example.thread;

import java.util.concurrent.Executors;

/**
 * ClassName: DaemonCase
 * date: 2019/10/10 14:42
 * Description: TODO
 *
 * @author fanzj@bonree.com
 * @since JDK 1.8
 */
public class DaemonCase {
    public static void main(String[] args) {
        ThreadGroup tg = Thread.currentThread().getThreadGroup();
        //
        Thread thread=new Thread(){
            @Override
            public void run() {
                while (true){
                    //todo
                }
            }
        };
        //thread.setDaemon(true);
        thread.start();
        System.out.println(Thread.currentThread()+"exit");
    }
}
